#{extends 'main.html' /}

<h1>${draft.title}</h1>
<form action="@{ProfileController.editDraft()}">
		#{if flash.success}
		<p style="color:GREEN"> ${flash.success}</p>
		#{/if}
		<p>
	<label for="title">Title: </label> <input type="text" name="title"
		value="${draft.title}" /><span class="error" style="color: Red">#{error 'title' /}</span>
</p>
<p>
	<label for="content">Your idea: </label>
	<textarea name="content">${draft.content}</textarea><span class="error" style="color: Red">#{error 'content' /}</span>
</p>
			 <input type="hidden" name ="draftId" value="${draft.id}"/>
			<input type="hidden" name ="userID" value="${userID}"/>
			<input type="submit" value ="Submit your idea" name="postButton"/>
			<input type="submit" value ="Save as draft" name="draftButton"/>
			<input type="submit" value ="Delete draft" name ="deleteButton"/>
			</form>